package com.jandar.spider.config.property;

import com.jandar.spider.config.YamlPropertySourceFactory;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.PropertySources;

@Getter
@Setter
@PropertySources({
        @PropertySource(value = "classpath:spider.yml",factory = YamlPropertySourceFactory.class,encoding = "UTF-8"),
        @PropertySource(value = "file:./config/spider.yml",factory = YamlPropertySourceFactory.class,ignoreResourceNotFound = true,encoding = "UTF-8")
})
@Configuration
@ConfigurationProperties(prefix = "property")
public class SpiderConfig {
    private Spider spider;
    private Chromedriver chromedriver;
}
